/*
 * Copyright (C) 2011-2012 Andrew Wells
 *
 * Licensed under the GNU License, Version 3
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.gnu.org/copyleft/gpl.html
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * Dungeons & Dragons Copyright (C) Wizards of the Coast. I do not claim
 * the right to any information used from their books or resources.
 */

package com.trace.wells.charactertracker;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

public class ConstantSpellHelper {

	/**
	 * Receives an array containing numbers representing the space the character
	 * has available for additional spells.
	 * 
	 * Based off that array and the class that is requesting the spells, this
	 * function concatinates all the valid spells the user can choose from and
	 * returns them in one large array.
	 * 
	 * @param listsToGet
	 * @param charClass
	 * @return
	 */

	public static String[] SPELL_SCHOOLS = new String[] { "Abjuration", "Conjuration", "Divination", "Enchantment", "Evocation", "Illusion", "Necromancy", "Transmutation", "Universal" };

	public static ArrayList<Map<String, String>> concatinateSpellLists(int[] listsToGet, String charClass, int maxSpellLevel) {
		String[][] spellArray = { {} };

		if (charClass.equals(ConstantHelper.CLASS_BARD)) {
			spellArray = SPELL_LIST_BARD;
		} else if (charClass.equals(ConstantHelper.CLASS_CLERIC)) {
			spellArray = SPELL_LIST_CLERIC;
		} else if (charClass.equals(ConstantHelper.CLASS_DRUID)) {
			spellArray = SPELL_LIST_DRUID;
		} else if (charClass.equals(ConstantHelper.CLASS_MONK)) {
			//TODO :  Monk magic type may need to be changed!!
			//spellArray = SPELL_LIST_
		} else if (charClass.equals(ConstantHelper.CLASS_PALADIN)) {
			spellArray = SPELL_LIST_PALADIN;
		} else if (charClass.equals(ConstantHelper.CLASS_RANGER)) {
			spellArray = SPELL_LIST_RANGER;
		} else if (charClass.equals(ConstantHelper.CLASS_SORCERER)) {
			spellArray = SPELL_LIST_SORCERER_WIZARD;
		} else if (charClass.equals(ConstantHelper.CLASS_WIZARD)) {
			spellArray = SPELL_LIST_SORCERER_WIZARD;
		} else
			;

		ArrayList<Map<String, String>> spellStringArrayList = new ArrayList<Map<String, String>>();

		//ArrayList<String> spellList = new ArrayList<String>();

		Map<String, String> map = new HashMap<String, String>();

		int spellCount = 0;
		for (int i = 0; i < maxSpellLevel; i++) {
			for (int j = 0; j < spellArray[i].length; j++) {
				map = new HashMap<String, String>();
				String[] splitString = spellArray[i][j].split("\\:");
				map.put("name", splitString[0]);
				map.put("level", splitString[1]);
				map.put("school", splitString[2]);
				spellStringArrayList.add(map);
			}
		}

		//
		//		String[] retArray = new String[spellCount];
		//
		//		int retArrayCount = 0;
		//		for (int i = 0; i < maxSpellLevel; i++) {
		//			for (int j = 0; j < spellArray[i].length; j++) {
		//				retArray[retArrayCount] = spellArray[i][j];
		//				retArrayCount++;
		//			}
		//		}

		return spellStringArrayList;
	}

	public static Spell getSpellData(String spellName, InputStream is, int charClass) {

		String charClassString = ConstantHelper.getClassNameAbreviation(charClass);
		boolean localBreakNeeded = false;
		Spell returnSpell = null;
		boolean needToStopReading = false;
		BufferedReader reader = new BufferedReader(new InputStreamReader(is));
		String thisLine;
		try {
			//BufferedReader br = new BufferedReader(new FileReader(filename));

			Spell s = new Spell();
			//		thisLine = br.readLine();

			while ((thisLine = reader.readLine()) != null) { // while loop begins

				while (!thisLine.contains("+++")) {
					if (thisLine.equals(spellName)) {

						//Set the spell's name
						s.setSpellName(thisLine);
						while (!needToStopReading) {
							if (thisLine.contains("+++")) {
								needToStopReading = true;
								break;
							}
							int length = thisLine.length();
							if (length > 40) {
								length = 40;
							}
							// If this line is not the spell description...
							if (thisLine.substring(0, length).contains(":")) {
								String[] propertyArrayElement = thisLine.split("\\:");
								propertyArrayElement[0] = propertyArrayElement[0].trim();
								propertyArrayElement[1] = propertyArrayElement[1].trim();
								s.addSpellProperty(propertyArrayElement[0], propertyArrayElement[1]);

								//								if (propertyArrayElement[0].compareToIgnoreCase("level") == 0) {
								//									if (propertyArrayElement[1].contains(",")) {
								//										String[] classSpellLevelArray = propertyArrayElement[1].split("\\,");
								//										for (int i = 0; i < classSpellLevelArray.length; i++) {
								//											for (int j = 0; j < ConstantHelper.CLASS_NUMBER_MAX; j++) {
								//												if (localBreakNeeded) {
								//													break;
								//												}
								//												classSpellLevelArray[j] = classSpellLevelArray[j].trim();
								//												String[] classAndLevel = classSpellLevelArray[j].split("\\s+");
								//												if (classAndLevel[0].equalsIgnoreCase(charClassString)) {
								//													s.setSpellLevel(Integer.parseInt(classAndLevel[1]));
								//													localBreakNeeded = true;
								//													break;
								//												}
								//
								//											}
								//
								//											classSpellLevelArray[i] = classSpellLevelArray[i].trim();
								//											s.addClassCastingLevel(classSpellLevelArray[i]);
								//										}
								//										localBreakNeeded = false;
								//									} else {
								//										for (int j = 0; j < ConstantHelper.CLASS_NUMBER_MAX; j++) {
								//											String[] classAndLevel = propertyArrayElement[1].split("\\s+");
								//											if (classAndLevel[0].equalsIgnoreCase(charClassString)) {
								//												s.setSpellLevel(Integer.parseInt(classAndLevel[1]));
								//												break;
								//											}
								//										}
								//										s.addClassCastingLevel(propertyArrayElement[1]);
								//									}

								//								}
							} else {
								if (length > 15)
									length = 15;
								String isSpellSchool = isSpellSchool(thisLine.substring(0, length));
								if (isSpellSchool.length() > 0)
									s.setSpellSchool(isSpellSchool);
								s.addSpellProperty("", thisLine);
							}
							//s.addSpellProperty("", thisLine);
							if ((thisLine = reader.readLine()) == null) {
								break;
							}

						}
					}//end if
					else if ((thisLine = reader.readLine()) == null)
						break;
				}//end inner while
				returnSpell = s;
				if (needToStopReading)
					break;
			}//end outer while
		}// end try
		catch (IOException e) {
			System.err.println("Error :  " + e);
		}
		return returnSpell;
	}

	public static SpellListItem getMinimumSpellData(String spellName, InputStream is, int charClass) {

		String charClassString = ConstantHelper.getClassNameAbreviation(charClass);
		SpellListItem returnSpellListItem = null;
		BufferedReader reader = new BufferedReader(new InputStreamReader(is));
		String thisLine;
		try {
			//BufferedReader br = new BufferedReader(new FileReader(filename));

			SpellListItem sli = new SpellListItem();

			while ((thisLine = reader.readLine()) != null) { // while loop begins

				//Handle name of spell
				sli.setName(thisLine);

				thisLine = reader.readLine();
				int length = thisLine.length();
				if (length > 15)
					length = 15;
				String isSpellSchool = isSpellSchool(thisLine.substring(0, length));
				sli.setSchool(isSpellSchool);

				thisLine = reader.readLine();
				String[] propertyArrayElement = thisLine.split("\\:");
				//Contains "Level"
				propertyArrayElement[0] = propertyArrayElement[0].trim();

				//Contains any number of levels per class i.e.  :  "Sor/Wiz 6, Water 7"
				propertyArrayElement[1] = propertyArrayElement[1].trim();
				String[] classSpellLevelArray = propertyArrayElement[1].split("\\,");

				for (int i = 0; i < classSpellLevelArray.length; i++) {
					for (int j = 0; j < ConstantHelper.CLASS_NUMBER_MAX; j++) {
						String[] classAndLevel = classSpellLevelArray[i].split("\\s+");
						if (classAndLevel[0].equalsIgnoreCase(charClassString)) {
							sli.setLevel(Integer.parseInt(classAndLevel[1]));
							break;
						}
					}
				}
				sli.setCount(0);
			}

		}// end try
		catch (IOException e) {
			System.err.println("Error :  " + e);
		}
		return returnSpellListItem;
	}

	public static String isSpellSchool(String data) {
		String returnString = "";
		for (String s : ConstantSpellHelper.SPELL_SCHOOLS) {
			if (data.contains(s)) {
				returnString = s;
				break;
			}
		}
		return returnString;
	}

	public static final String[][] SPELL_LIST_BARD = new String[][]

	{
			{ "Dancing Lights:0:Evocation", "Daze:0:Enchantment", "Detect Magic:0:Divination", "Flare:0:Evocation", "Ghost Sound:0:Illusion", "Know Direction:0:Divination", "Light:0:Evocation", "Lullaby:0:Enchantment",
					"Mage Hand:0:Transmutation", "Mending:0:Transmutation", "Message:0:Transmutation", "Open/Close:0:Transmutation", "Prestidigitation:0:Universal", "Read Magic:0:Divination", "Resistance:0:Abjuration",
					"Summon Instrument:0:Conjuration", },
			{ "Alarm:1:Abjuration", "Animate Rope:1:Transmutation", "Cause Fear:1:Necromancy", "Charm Person:1:Enchantment", "Comprehend Languages:1:Divination", "Confusion, Lesser:1:Enchantment",
					"Cure Light Wounds:1:Conjuration", "Detect Secret Doors:1:Divination", "Disguise Self:1:Illusion", "Erase:1:Transmutation", "Expeditious Retreat:1:Transmutation", "Feather Fall:1:Transmutation",
					"Grease:1:Conjuration", "Hideous Laughter:1:Enchantment", "Hypnotism:1:Enchantment", "Identify:1:Divination", "Magic Mouth:1:Illusion", "Magic Aura:1:Illusion", "Obscure Object:1:Abjuration",
					"Remove Fear:1:Abjuration", "Silent Image:1:Illusion", "Sleep:1:Enchantment", "Summon Monster I:1:Conjuration", "Undetectable Alignment:1:Abjuration", "Unseen Servant:1:Conjuration",
					"Ventriloquism:1:Illusion", },
			{ "Alter Self:2:Transmutation", "Animal Messenger:2:Enchantment", "Animal Trance:2:Enchantment", "Blindness/Deafness:2:Necromancy", "Blur:2:Illusion", "Calm Emotions:2:Enchantment",
					"Cat's Grace:2:Transmutation", "Cure Moderate Wounds:2:Conjuration", "Darkness:2:Evocation", "Daze Monster:2:Enchantment", "Delay Poison:2:Conjuration", "Detect Thoughts:2:Divination",
					"Eagle's Splendor:2:Transmutation", "Enthrall:2:Enchantment", "Fox's Cunning:2:Transmutation", "Glitterdust:2:Conjuration", "Glossolalia:0:Evocation", "Heroism:2:Enchantment",
					"Hold Person:2:Enchantment", "Hypnotic Pattern:2:Illusion", "Invisibility:2:Illusion", "Locate Object:2:Divination", "Minor Image:2:Illusion", "Mirror Image:2:Illusion", "Misdirection:2:Illusion",
					"Pyrotechnics:2:Transmutation", "Rage:2:Enchantment", "Scare:2:Necromancy", "Shatter:2:Evocation", "Silence:2:Illusion", "Sound Burst:2:Evocation", "Suggestion:2:Enchantment",
					"Summon Monster II:2:Conjuration", "Summon Swarm:2:Conjuration", "Tongues:2:Divination", "Whispering Wind:2:Transmutation", },
			{ "Blink:3:Transmutation", "Charm Monster:3:Enchantment", "Clairaudience/Clairvoyance:3:Divination", "Confusion:3:Enchantment", "Crushing Despair:3:Enchantment", "Cure Serious Wounds:3:Conjuration",
					"Daylight:3:Evocation", "Deep Slumber:3:Enchantment", "Dispel Magic:3:Abjuration", "Displacement:3:Illusion", "Fear:3:Necromancy", "Gaseous Form:3:Transmutation", "Geas, Lesser:3:Enchantment",
					"Glibness:3:Transmutation", "Good Hope:3:Enchantment", "Haste:3:Transmutation", "Illusory Script:3:Illusion", "Invisibility Sphere:3:Illusion", "Major Image:3:Illusion",
					"Phantom Steed:3:Conjuration", "Remove Curse:3:Abjuration", "Scrying:3:Divination", "Sculpt Sound:3:Transmutation", "Secret Page:3:Transmutation", "See Invisibility:3:Divination",
					"Sepia Snake Sigil:3:Conjuration", "Slow:3:Transmutation", "Speak with Animals:3:Divination", "Summon Monster III:3:Conjuration", "Tiny Hut:3:Evocation", },
			{ "Break Enchantment:4:Abjuration", "Cure Critical Wounds:4:Conjuration", "Detect Scrying:4:Divination", "Dimension Door:4:Conjuration", "Dominate Person:4:Enchantment", "Freedom of Movement:4:Abjuration",
					"Hallucinatory Terrain:4:Illusion", "Hold Monster:4:Enchantment", "Invisibility, Greater:4:Illusion", "Legend Lore:4:Divination", "Locate Creature:4:Divination", "Modify Memory:4:Enchantment",
					"Neutralize Poison:4:Conjuration", "Rainbow Pattern:4:Illusion", "Repel Vermin:4:Abjuration", "Secure Shelter:4:Conjuration", "Shadow Conjuration:4:Illusion", "Shout:4:Evocation",
					"Speak with Plants:4:Divination", "Summon Monster IV:4:Conjuration", "Zone of Silence:4:Illusion", },
			{ "Cure Light Wounds, Mass:5:Conjuration", "Dispel Magic, Greater:5:Abjuration", "Dream:5:Illusion", "False Vision:5:Illusion", "Heroism, Greater:5:Enchantment", "Mind Fog:5:Enchantment",
					"Mirage Arcana:5:Illusion", "Mislead:5:Illusion", "Nightmare:5:Illusion", "Persistent Image:5:Illusion", "Seeming:5:Illusion", "Shadow Evocation:5:Illusion", "Shadow Walk:5:Illusion",
					"Song of Discord:5:Enchantment", "Suggestion, Mass:5:Enchantment", "Summon Monster V:5:Conjuration", },
			{ "Analyze Dweomer:6:Divination", "Animate Objects:6:Transmutation", "Cat's Grace, Mass:6:Transmutation", "Charm Monster, Mass:6:Enchantment", "Cure Moderate Wounds, Mass:6:Conjuration",
					"Eagle's Splendor, Mass:6:Transmutation", "Eyebite:6:Necromancy", "Find the Path:6:Divination", "Fox's Cunning, Mass:6:Transmutation", "Geas/Quest:6:Enchantment", "Heroes' Feast:6:Conjuration",
					"Irresistible Dance:6:Enchantment", "Permanent Image:6:Illusion", "Programmed Image:6:Illusion", "Project Image:6:Illusion", "Scrying, Greater:6:Divination", "Shout, Greater:6:Evocation",
					"Summon Monster VI:6:Conjuration", "Sympathetic Vibration:6:Evocation", "Veil:6:Illusion", } };

	public static final String[][] SPELL_LIST_CLERIC = new String[][] {

			{ "Create Water:0:Conjuration", "Cure Minor Wounds:0:Conjuration", "Detect Magic:0:Divination", "Detect Poison:0:Divination", "Guidance:0:Divination", "Inflict Minor Wounds:0:Necromancy",
					"Light:0:Evocation", "Mending:0:Transmutation", "Purify Food and Drink:0:Transmutation", "Read Magic:0:Divination", "Resistance:0:Abjuration", "Virtue:0:Transmutation", },
			{ "Bane:1:Enchantment", "Bless:1:Enchantment", "Bless Water:1:Transmutation", "Burning Hands:1:Evocation", "Calm Animals:1:Enchantment", "Cause Fear:1:Necromancy", "Command:1:Enchantment",
					"Comprehend Languages:1:Divination", "Cure Light Wounds:1:Conjuration", "Curse Water:1:Necromancy", "Deathwatch:1:Necromancy", "Detect Chaos:1:Divination", "Detect Evil:1:Divination",
					"Detect Good:1:Divination", "Detect Law:1:Divination", "Detect Secret Doors:1:Divination", "Detect Undead:1:Divination", "Disguise Self:1:Illusion", "Divine Favor:1:Evocation", "Doom:1:Necromancy",
					"Endure Elements:1:Abjuration", "Enlarge Person:1:Transmutation", "Entangle:1:Transmutation", "Entropic Shield:1:Abjuration", "Hide from Undead:1:Abjuration", "Inflict Light Wounds:1:Necromancy",
					"Longstrider:1:Transmutation", "Magic Aura:1:Illusion", "Magic Stone:1:Transmutation", "Magic Weapon:1:Transmutation", "Obscuring Mist:1:Conjuration", "Obscuring Mist:1:Conjuration",
					"Protection from Chaos:1:Abjuration", "Protection from Evil:1:Abjuration", "Protection from Good:1:Abjuration", "Protection from Law:1:Abjuration", "Remove Fear:1:Abjuration",
					"Sanctuary:1:Abjuration", "Shield of Faith:1:Abjuration", "Summon Monster I:1:Conjuration", },
			{ "Aid:2:Enchantment", "Align Weapon:2:Transmutation", "Augury:2:Divination", "Barkskin:2:Transmutation", "Bear's Endurance:2:Transmutation", "Bull's Strength:2:Transmutation", "Calm Emotions:2:Enchantment",
					"Consecrate:2:Evocation", "Cure Moderate Wounds:2:Conjuration", "Darkness:2:Evocation", "Death Knell:2:Necromancy", "Delay Poison:2:Conjuration", "Desecrate:2:Evocation",
					"Detect Thoughts:2:Divination", "Eagle's Splendor:2:Transmutation", "Enthrall:2:Enchantment", "Find Traps:2:Divination", "Fog Cloud:2:Conjuration", "Gentle Repose:2:Necromancy",
					"Heat Metal:2:Transmutation", "Hold Animal:2:Enchantment", "Hold Person:2:Enchantment", "Identify:2:Divination", "Inflict Moderate Wounds:2:Necromancy", "Invisibility:2:Illusion",
					"Locate Object:2:Divination", "Make Whole:2:Transmutation", "Owl's Wisdom:2:Transmutation", "Produce Flame:2:Evocation", "Remove Paralysis:2:Conjuration", "Resist Energy:2:Abjuration",
					"Restoration, Lesser:2:Conjuration", "Shatter:2:Evocation", "Shield Other:2:Abjuration", "Silence:2:Illusion", "Soften Earth and Stone:2:Transmutation", "Sound Burst:2:Evocation",
					"Spiritual Weapon:2:Evocation", "Status:2:Divination", "Summon Monster II:2:Conjuration", "Undetectable Alignment:2:Abjuration", "Wind Wall:2:Evocation", "Zone of Truth:2:Enchantment" },
			{ "Animate Dead:3:Necromancy", "Bestow Curse:3:Necromancy", "Blindness/Deafness:3:Necromancy", "Clairaudience/Clairvoyance:3:Divination", "Contagion:3:Necromancy", "Continual Flame:3:Evocation",
					"Create Food and Water:3:Conjuration", "Cure Serious Wounds:3:Conjuration", "Daylight:3:Evocation", "Deeper Darkness:3:Evocation", "Dispel Magic:3:Abjuration", "Dominate Animal:3:Enchantment",
					"Fly:3:Transmutation", "Gaseous Form:3:Transmutation", "Glyph of Warding:3:Abjuration", "Helping Hand:3:Evocation", "Inflict Serious Wounds:3:Necromancy", "Invisibility Purge:3:Evocation",
					"Magic Circle against Chaos:3:Abjuration", "Magic Circle against Evil:3:Abjuration", "Magic Circle against Good:3:Abjuration", "Magic Circle against Law:3:Abjuration",
					"Magic Vestment:3:Transmutation", "Meld into Stone:3:Transmutation", "Nondetection:3:Abjuration", "Obscure Object:3:Abjuration", "Plant Growth:3:Transmutation", "Prayer:3:Enchantment",
					"Protection from Energy:3:Abjuration", "Remove Blindness/Deafness:3:Conjuration", "Remove Curse:3:Abjuration", "Remove Disease:3:Conjuration", "Searing Light:3:Evocation",
					"Speak with Dead:3:Necromancy", "Stone Shape:3:Transmutation", "Stone Shape:3:Transmutation", "Summon Monster III:3:Conjuration", "Water Breathing:3:Transmutation", "Water Walk:3:Transmutation" },
			{ "Air Walk:4:Transmutation", "Chaos Hammer:0:Evocation", "Command Plants:4:Transmutation", "Confusion:4:Enchantment", "Control Water:4:Transmutation", "Cure Critical Wounds:4:Conjuration",
					"Death Ward:4:Necromancy", "Dimension Door:4:Conjuration", "Dimensional Anchor:4:Abjuration", "Discern Lies:4:Divination", "Dismissal:4:Abjuration", "Divination:4:Divination",
					"Divine Power:4:Evocation", "Fire Shield:4:Evocation", "Freedom of Movement:4:Abjuration", "Giant Vermin:4:Transmutation", "Holy Smite:0:Evocation", "Imbue with Spell Ability:4:Evocation",
					"Inflict Critical Wounds:4:Necromancy", "Magic Weapon, Greater:4:Transmutation", "Neutralize Poison:4:Conjuration", "Order's Wrath:0:Evocation", "Planar Ally, Lesser:4:Conjuration",
					"Poison:4:Necromancy", "Repel Vermin:4:Abjuration", "Restoration:4:Conjuration", "Sending:4:Evocation", "Spell Immunity:4:Abjuration", "Spike Stones:4:Transmutation",
					"Summon Monster IV:4:Conjuration", "Summon Nature's Ally IV:4:Conjuration", "Tongues:4:Divination", "Unholy Blight:0:Evocation", "Wall of Fire:4:Evocation" },
			{ "Atonement:5:Abjuration", "Break Enchantment:5:Abjuration", "Command, Greater:5:Enchantment", "Commune with Nature:5:Divination", "Commune:5:Divination", "Control Winds:5:Transmutation",
					"Cure Light Wounds, Mass:5:Conjuration", "Dispel Chaos:5:Abjuration", "Dispel Evil:5:Abjuration", "Dispel Good:5:Abjuration", "Dispel Law:5:Abjuration", "Disrupting Weapon:5:Transmutation",
					"False Vision:5:Illusion", "Flame Strike:5:Evocation", "Hallow:5:Evocation", "Ice Storm:5:Evocation", "Inflict Light Wounds, Mass:5:Necromancy", "Insect Plague:5:Conjuration",
					"Mark of Justice:5:Necromancy", "Plane Shift:5:Conjuration", "Raise Dead:5:Conjuration", "Righteous Might:5:Transmutation", "Scrying:5:Divination", "Slay Living:5:Necromancy",
					"Spell Resistance:5:Abjuration", "Summon Monster V:5:Conjuration", "Symbol of Pain:5:Necromancy", "Symbol of Sleep:5:Enchantment", "Teleport:5:Conjuration", "True Seeing:5:Divination",
					"Unhallow:5:Evocation", "Wall of Stone:5:Conjuration", "Wall of Thorns:5:Conjuration" },
			{ "Animate Objects:6:Transmutation", "Antilife Shell:6:Abjuration", "Antimagic Field:8:Abjuration", "Banishment:6:Abjuration", "Bear's Endurance, Mass:6:Transmutation", "Blade Barrier:6:Evocation",
					"Bull's Strength, Mass:6:Transmutation", "Chain Lightning:6:Evocation", "Cone of Cold:6:Evocation", "Create Undead:6:Necromancy", "Cure Moderate Wounds, Mass:6:Conjuration",
					"Dispel Magic, Greater:6:Abjuration", "Eagle's Splendor, Mass:6:Transmutation", "Find the Path:6:Divination", "Fire Seeds:6:Conjuration", "Forbiddance:6:Abjuration", "Geas/Quest:6:Enchantment",
					"Glyph of Warding, Greater:6:Abjuration", "Harm:6:Necromancy", "Heal:6:Conjuration", "Heroes' Feast:6:Conjuration", "Hold Monster:6:Enchantment", "Inflict Moderate Wounds, Mass:6:Necromancy",
					"Mislead:6:Illusion", "Owl's Wisdom, Mass:6:Transmutation", "Planar Ally:6:Conjuration", "Repel Wood:6:Transmutation", "Stoneskin:6:Abjuration", "Summon Monster VI:6:Conjuration",
					"Symbol of Fear:6:Necromancy", "Symbol of Persuasion:6:Enchantment", "Undeath to Death:6:Necromancy", "Wind Walk:6:Transmutation", "Word of Recall:6:Conjuration" },
			{ "Blasphemy:7:Evocation", "Acid Fog:7:Conjuration", "Animal Shapes:7:Transmutation", "Animate Plants:7:Transmutation", "Control Weather:7:Transmutation", "Cure Serious Wounds, Mass:7:Conjuration",
					"Destruction:7:Necromancy", "Dictum:7:Evocation", "Disintegrate:7:Transmutation", "Earthquake:7:Evocation", "Ethereal Jaunt:7:Transmutation", "Fire Storm:7:Evocation", "Grasping Hand:7:Evocation",
					"Holy Word:7:Evocation", "Inflict Serious Wounds, Mass:7:Necromancy", "Legend Lore:7:Divination", "Power Word Blind:7:Enchantment", "Refuge:7:Conjuration", "Regenerate:7:Conjuration",
					"Repulsion:7:Abjuration", "Restoration, Greater:7:Conjuration", "Resurrection:7:Conjuration", "Screen:7:Illusion", "Scrying, Greater:7:Divination", "Spell Turning:7:Abjuration",
					"Summon Monster VII:7:Conjuration", "Sunbeam:7:Evocation", "Symbol of Stunning:7:Enchantment", "Symbol of Weakness:7:Necromancy", "Teleport, Greater:7:Conjuration", "Word of Chaos:7:Evocation" },
			{ "Moment of Prescience:8:Divination", "Horrid Wilting:8:Necromancy", "Power Word Stun:8:Enchantment", "Polymorph Any Object:8:Transmutation", "Phase Door:8:Conjuration", "Sunburst:8:Evocation",
					"Clenched Fist:8:Evocation", "Mind Blank:8:Abjuration", "Control Plants:8:Transmutation", "Protection from Spells:8:Abjuration", "Incendiary Cloud:8:Conjuration", "Iron Body:8:Transmutation",
					"Summon Nature's Ally VIII:8:Conjuration", "Whirlwind:8:Evocation", "Cloak of Chaos:8:Abjuration", "Create Greater Undead:8:Necromancy", "Cure Critical Wounds, Mass:8:Conjuration",
					"Dimensional Lock:8:Abjuration", "Discern Location:8:Divination", "Holy Aura:8:Abjuration", "Inflict Critical Wounds, Mass:8:Necromancy", "Planar Ally, Greater:8:Conjuration",
					"Shield of Law:8:Abjuration", "Spell Immunity, Greater:8:Abjuration", "Summon Monster VIII:8:Conjuration", "Symbol of Death:8:Necromancy", "Symbol of Insanity:8:Enchantment",
					"Unholy Aura:8:Abjuration" },
			{ "Astral Projection:9:Necromancy", "Crushing Hand:9:Evocation", "Elemental Swarm:9:Conjuration", "Energy Drain:9:Necromancy", "Etherealness:9:Transmutation", "Foresight:9:Divination", "Gate:9:Conjuration",
					"Heal, Mass:9:Conjuration", "Implosion:9:Evocation", "Mage's Disjunction:9:Abjuration", "Miracle:9:Evocation", "Power Word Kill:9:Enchantment", "Prismatic Sphere:9:Abjuration",
					"Shambler:9:Conjuration", "Shapechange:9:Transmutation", "Soul Bind:9:Necromancy", "Storm of Vengeance:9:Conjuration", "Summon Monster I:1:Conjuration", "Summon Monster IX:9:Conjuration",
					"Time Stop:9:Transmutation", "True Resurrection:9:Conjuration", "Wail of the Banshee:9:Necromancy" } };

	public static final String[][] SPELL_LIST_DRUID = new String[][] {
			{ "Create Water:0:Conjuration", "Cure Minor Wounds:0:Conjuration", "Detect Magic:0:Divination", "Detect Poison:0:Divination", "Flare:0:Evocation", "Guidance:0:Divination", "Know Direction:0:Divination",
					"Light:0:Evocation", "Mending:0:Transmutation", "Purify Food and Drink:0:Transmutation", "Read Magic:0:Divination", "Resistance:0:Abjuration", "Virtue:0:Transmutation", },
			{ "Calm Animals:1:Enchantment", "Charm Animal:1:Enchantment", "Cure Light Wounds:1:Conjuration", "Detect Animals or Plants:1:Divination", "Detect Snares and Pits:1:Divination",
					"Endure Elements:1:Abjuration", "Entangle:1:Transmutation", "Faerie Fire:1:Evocation", "Goodberry:1:Transmutation", "Hide from Animals:1:Abjuration", "Jump:1:Transmutation",
					"Longstrider:1:Transmutation", "Magic Fang:1:Transmutation", "Magic Stone:1:Transmutation", "Obscuring Mist:1:Conjuration", "Pass without Trace:1:Transmutation", "Produce Flame:1:Evocation",
					"Shillelagh:1:Transmutation", "Speak with Animals:1:Divination", "Summon Nature's Ally I:1:Conjuration", },
			{ "Animal Messenger:2:Enchantment", "Animal Trance:2:Enchantment", "Barkskin:2:Transmutation", "Bear's Endurance:2:Transmutation", "Bull's Strength:2:Transmutation", "Cat's Grace:2:Transmutation",
					"Chill Metal:2:Transmutation", "Delay Poison:2:Conjuration", "Fire Trap:2:Abjuration", "Flame Blade:2:Evocation", "Flaming Sphere:2:Evocation", "Fog Cloud:2:Conjuration", "Gust of Wind:2:Evocation",
					"Heat Metal:2:Transmutation", "Hold Animal:2:Enchantment", "Owl's Wisdom:2:Transmutation", "Reduce Animal:2:Transmutation", "Resist Energy:2:Abjuration", "Restoration, Lesser:2:Conjuration",
					"Soften Earth and Stone:2:Transmutation", "Spider Climb:2:Transmutation", "Summon Nature's Ally II:2:Conjuration", "Summon Swarm:2:Conjuration", "Tree Shape:2:Transmutation",
					"Warp Wood:2:Transmutation", "Wood Shape:2:Transmutation", },
			{ "Call Lightning:3:Evocation", "Contagion:3:Necromancy", "Cure Moderate Wounds:3:Conjuration", "Daylight:3:Evocation", "Diminish Plants:3:Transmutation", "Dominate Animal:3:Enchantment",
					"Magic Fang, Greater:3:Transmutation", "Meld into Stone:3:Transmutation", "Neutralize Poison:3:Conjuration", "Plant Growth:3:Transmutation", "Poison:3:Necromancy",
					"Protection from Energy:3:Abjuration", "Quench:3:Transmutation", "Remove Disease:3:Conjuration", "Sleet Storm:3:Conjuration", "Snare:3:Transmutation", "Speak with Plants:3:Divination",
					"Spike Growth:3:Transmutation", "Stone Shape:3:Transmutation", "Summon Nature's Ally III:4:Conjuration", "Water Breathing:3:Transmutation", "Wind Wall:3:Evocation", },
			{ "Air Walk:4:Transmutation", "Antiplant Shell:4:Abjuration", "Blight:4:Necromancy", "Command Plants:4:Transmutation", "Control Water:4:Transmutation", "Cure Serious Wounds:4:Conjuration",
					"Dispel Magic:4:Abjuration", "Flame Strike:4:Evocation", "Freedom of Movement:4:Abjuration", "Giant Vermin:4:Transmutation", "Ice Storm:4:Evocation", "Reincarnate:4:Transmutation",
					"Repel Vermin:4:Abjuration", "Rusting Grasp:4:Transmutation", "Scrying:4:Divination", "Spike Stones:4:Transmutation", "Summon Nature's Ally IV:4:Conjuration", },
			{ "Animal Growth:5:Transmutation", "Atonement:5:Abjuration", "Awaken:5:Transmutation", "Baleful Polymorph:5:Transmutation", "Call Lightning Storm:5:Evocation", "Commune with Nature:5:Divination",
					"Control Winds:5:Transmutation", "Cure Critical Wounds:5:Conjuration", "Death Ward:5:Necromancy", "Hallow:5:Evocation", "Insect Plague:5:Conjuration", "Stoneskin:5:Abjuration",
					"Summon Nature's Ally V:5:Conjuration", "Transmute Mud to Rock:5:Transmutation", "Transmute Rock to Mud:5:Transmutation", "Tree Stride:5:Conjuration", "Unhallow:5:Evocation",
					"Wall of Fire:5:Evocation", "Wall of Thorns:5:Conjuration", },
			{ "Antilife Shell:6:Abjuration", "Bear's Endurance, Mass:6:Transmutation", "Bull's Strength, Mass:6:Transmutation", "Cat's Grace, Mass:6:Transmutation", "Cure Light Wounds, Mass:6:Conjuration",
					"Dispel Magic, Greater:6:Abjuration", "Find the Path:6:Divination", "Fire Seeds:6:Conjuration", "Ironwood:6:Transmutation", "Liveoak:6:Transmutation", "Move Earth:6:Transmutation",
					"Owl's Wisdom, Mass:6:Transmutation", "Repel Wood:6:Transmutation", "Spellstaff:6:Transmutation", "Stone Tell:6:Divination", "Summon Nature's Ally VI:6:Conjuration",
					"Transport via Plants:6:Conjuration", "Wall of Stone:6:Conjuration", },
			{ "Animate Plants:7:Transmutation", "Changestaff:7:Transmutation", "Control Weather:7:Transmutation", "Creeping Doom:7:Conjuration", "Cure Moderate Wounds, Mass:7:Conjuration", "Fire Storm:7:Evocation",
					"Heal:7:Conjuration", "Scrying, Greater:7:Divination", "Summon Nature's Ally VII:7:Conjuration", "Sunbeam:7:Evocation", "Transmute Metal to Wood:7:Transmutation", "True Seeing:7:Divination",
					"Wind Walk:7:Transmutation", },
			{ "Animal Shapes:8:Transmutation", "Control Plants:8:Transmutation", "Cure Serious Wounds, Mass:8:Conjuration", "Earthquake:8:Evocation", "Finger of Death:8:Necromancy", "Repel Metal or Stone:8:Abjuration",
					"Reverse Gravity:8:Transmutation", "Summon Nature's Ally VIII:8:Conjuration", "Sunburst:8:Evocation", "Whirlwind:8:Evocation", "Word of Recall:8:Conjuration", },
			{ "Antipathy:9:Enchantment", "Cure Critical Wounds, Mass:9:Conjuration", "Elemental Swarm:9:Conjuration", "Foresight:9:Divination", "Regenerate:9:Conjuration", "Shambler:9:Conjuration",
					"Shapechange:9:Transmutation", "Storm of Vengeance:9:Conjuration", "Summon Nature's Ally IX:9:Conjuration", "Sympathy:9:Enchantment", } };

	public static final String[][] SPELL_LIST_PALADIN = new String[][] {
			{ "Bless:1:Enchantment", "Bless Water:1:Transmutation", "Bless Weapon:1:Transmutation", "Create Water:1:Conjuration", "Cure Light Wounds:1:Conjuration", "Detect Poison:1:Divination",
					"Detect Undead:1:Divination", "Divine Favor:1:Evocation", "Endure Elements:1:Abjuration", "Magic Weapon:1:Transmutation", "Protection from Chaos:1:Abjuration", "Protection from Evil:1:Abjuration",
					"Read Magic:1:Divination", "Resistance:1:Abjuration", "Restoration, Lesser:1:Conjuration", "Virtue:1:Transmutation", },
			{ "Bull's Strength:2:Transmutation", "Delay Poison:2:Conjuration", "Eagle's Splendor:2:Transmutation", "Owl's Wisdom:2:Transmutation", "Remove Paralysis:2:Conjuration", "Resist Energy:2:Abjuration",
					"Shield Other:2:Abjuration", "Undetectable Alignment:2:Abjuration", "Zone of Truth:2:Enchantment" },
			{ "Cure Moderate Wounds:3:Conjuration", "Daylight:3:Evocation", "Discern Lies:3:Divination", "Dispel Magic:3:Abjuration", "Heal Mount:3:Conjuration", "Magic Circle against Chaos:3:Abjuration",
					"Magic Circle against Evil:3:Abjuration", "Magic Weapon, Greater:3:Transmutation", "Prayer:3:Enchantment", "Remove Blindness/Deafness:3:Conjuration", "Remove Curse:3:Abjuration", },
			{ "Break Enchantment:4:Abjuration", "Cure Serious Wounds:4:Conjuration", "Death Ward:4:Necromancy", "Dispel Chaos:4:Abjuration", "Dispel Evil:4:Abjuration", "Holy Sword:4:Evocation",
					"Mark of Justice:4:Necromancy", "Neutralize Poison:4:Conjuration", "Restoration:4:Conjuration", } };

	public static final String[][] SPELL_LIST_RANGER = new String[][] {
			{ "Alarm:1:Abjuration", "Animal Messenger:1:Enchantment", "Calm Animals:1:Enchantment", "Charm Animal:1:Enchantment", "Delay Poison:1:Conjuration", "Detect Animals or Plants:1:Divination",
					"Detect Poison:1:Divination", "Detect Snares and Pits:1:Divination", "Endure Elements:1:Abjuration", "Entangle:1:Transmutation", "Hide from Animals:1:Abjuration", "Jump:1:Transmutation",
					"Longstrider:1:Transmutation", "Magic Fang:1:Transmutation", "Pass without Trace:1:Transmutation", "Read Magic:1:Divination", "Resist Energy:1:Abjuration", "Speak with Animals:1:Divination",
					"Summon Nature's Ally I:1:Conjuration", },
			{ "Barkskin:2:Transmutation", "Bear's Endurance:2:Transmutation", "Cat's Grace:2:Transmutation", "Cure Light Wounds:2:Conjuration", "Hold Animal:2:Enchantment", "Owl's Wisdom:2:Transmutation",
					"Protection from Energy:2:Abjuration", "Snare:2:Transmutation", "Speak with Plants:2:Divination", "Spike Growth:2:Transmutation", "Summon Nature's Ally II:2:Conjuration", "Wind Wall:2:Evocation", },
			{ "Command Plants:3:Transmutation", "Cure Moderate Wounds:3:Conjuration", "Darkvision:3:Transmutation", "Diminish Plants:3:Transmutation", "Magic Fang, Greater:3:Transmutation",
					"Neutralize Poison:3:Conjuration", "Plant Growth:3:Transmutation", "Reduce Animal:3:Transmutation", "Remove Disease:3:Conjuration", "Repel Vermin:3:Abjuration",
					"Summon Nature's Ally III:4:Conjuration", "Tree Shape:3:Transmutation", "Water Walk:3:Transmutation", },
			{ "Animal Growth:4:Transmutation", "Commune with Nature:4:Divination", "Cure Serious Wounds:4:Conjuration", "Freedom of Movement:4:Abjuration", "Nondetection:4:Abjuration",
					"Summon Nature's Ally IV:4:Conjuration", "Tree Stride:4:Conjuration", }

	};

	public static final String[][] SPELL_LIST_SORCERER_WIZARD = new String[][] {

			{ "Resistance:0:Abjuration", "Acid Splash:0:Conjuration", "Detect Poison:0:Divination", "Detect Magic:0:Divination", "Read Magic:0:Divination", "Daze:0:Enchantment", "Dancing Lights:0:Evocation",
					"Flare:0:Evocation", "Light:0:Evocation", "Ray of Frost:0:Evocation", "Ghost Sound:0:Illusion", "Disrupt Undead:0:Necromancy", "Touch of Fatigue:0:Necromancy", "Mage Hand:0:Transmutation",
					"Mending:0:Transmutation", "Message:0:Transmutation", "Open/Close:0:Transmutation", "Arcane Mark:0:Universal", "Prestidigitation:0:Universal", },
			{ "Alarm:1:Abjuration", "Endure Elements:1:Abjuration", "Hold Portal:1:Abjuration", "Protection from Chaos:1:Abjuration", "Protection from Evil:1:Abjuration", "Protection from Good:1:Abjuration",
					"Protection from Law:1:Abjuration", "Shield:1:Abjuration", "Grease:1:Conjuration", "Mage Armor:1:Conjuration", "Mount:1:Conjuration", "Obscuring Mist:1:Conjuration", "Summon Monster I:1:Conjuration",
					"Unseen Servant:1:Conjuration", "Comprehend Languages:1:Divination", "Detect Secret Doors:1:Divination", "Detect Undead:1:Divination", "Identify:1:Divination", "True Strike:1:Divination",
					"Charm Person:1:Enchantment", "Hypnotism:1:Enchantment", "Sleep:1:Enchantment", "Burning Hands:1:Evocation", "Floating Disk:1:Evocation", "Magic Missile:1:Evocation", "Shocking Grasp:1:Evocation",
					"Color Spray:1:Illusion", "Disguise Self:1:Illusion", "Magic Aura:1:Illusion", "Silent Image:1:Illusion", "Ventriloquism:1:Illusion", "Cause Fear:1:Necromancy", "Chill Touch:1:Necromancy",
					"Ray of Enfeeblement:1:Necromancy", "Animate Rope:1:Transmutation", "Enlarge Person:1:Transmutation", "Erase:1:Transmutation", "Expeditious Retreat:1:Transmutation", "Feather Fall:1:Transmutation",
					"Jump:1:Transmutation", "Magic Weapon:1:Transmutation", },
			{ "Reduce Person:2:Transmutation", "Arcane Lock:2:Abjuration", "Obscure Object:2:Abjuration", "Protection from Arrows:2:Abjuration", "Resist Energy:2:Abjuration", "Acid Arrow:2:Conjuration",
					"Fog Cloud:2:Conjuration", "Glitterdust:2:Conjuration", "Summon Monster II:2:Conjuration", "Summon Swarm:2:Conjuration", "Web:2:Conjuration", "Detect Thoughts:2:Divination",
					"Locate Object:2:Divination", "See Invisibility:2:Divination", "Daze Monster:2:Enchantment", "Hideous Laughter:2:Enchantment", "Touch of Idiocy:2:Enchantment", "Continual Flame:2:Evocation",
					"Darkness:2:Evocation", "Flaming Sphere:2:Evocation", "Gust of Wind:2:Evocation", "Scorching Ray:2:Evocation", "Shatter:2:Evocation", "Blur:2:Illusion", "Hypnotic Pattern:2:Illusion",
					"Invisibility:2:Illusion", "Magic Mouth:2:Illusion", "Minor Image:2:Illusion", "Mirror Image:2:Illusion", "Misdirection:2:Illusion", "Phantom Trap:2:Illusion", "Blindness/Deafness:2:Necromancy",
					"Command Undead:2:Necromancy", "False Life:2:Necromancy", "Ghoul Touch:2:Necromancy", "Scare:2:Necromancy", "Spectral Hand:2:Necromancy", "Alter Self:2:Transmutation",
					"Bear's Endurance:2:Transmutation", "Bull's Strength:2:Transmutation", "Cat's Grace:2:Transmutation", "Darkvision:2:Transmutation", "Eagle's Splendor:2:Transmutation",
					"Fox's Cunning:2:Transmutation", "Knock:2:Transmutation", "Levitate:2:Transmutation", "Owl's Wisdom:2:Transmutation", "Pyrotechnics:2:Transmutation", "Rope Trick:2:Transmutation",
					"Spider Climb:2:Transmutation", "Whispering Wind:2:Transmutation", },
			{ "Dispel Magic:3:Abjuration", "Explosive Runes:3:Abjuration", "Magic Circle against Chaos:3:Abjuration", "Magic Circle against Evil:3:Abjuration", "Magic Circle against Good:3:Abjuration",
					"Magic Circle against Law:3:Abjuration", "Nondetection:3:Abjuration", "Protection from Energy:3:Abjuration", "Phantom Steed:3:Conjuration", "Sepia Snake Sigil:3:Conjuration",
					"Sleet Storm:3:Conjuration", "Stinking Cloud:3:Conjuration", "Summon Monster III:3:Conjuration", "Arcane Sight:3:Divination", "Clairaudience/Clairvoyance:3:Divination", "Tongues:3:Divination",
					"Deep Slumber:3:Enchantment", "Heroism:3:Enchantment", "Hold Person:3:Enchantment", "Rage:3:Enchantment", "Suggestion:3:Enchantment", "Daylight:3:Evocation", "Fireball:3:Evocation",
					"Lightning Bolt:3:Evocation", "Tiny Hut:3:Evocation", "Wind Wall:3:Evocation", "Displacement:3:Illusion", "Illusory Script:3:Illusion", "Invisibility Sphere:3:Illusion", "Major Image:3:Illusion",
					"Gentle Repose:3:Necromancy", "Halt Undead:3:Necromancy", "Ray of Exhaustion:3:Necromancy", "Vampiric Touch:3:Necromancy", "Blink:3:Transmutation", "Flame Arrow:3:Transmutation",
					"Fly:3:Transmutation", "Gaseous Form:3:Transmutation", "Haste:3:Transmutation", "Keen Edge:3:Transmutation", "Magic Weapon, Greater:3:Transmutation", "Secret Page:3:Transmutation",
					"Shrink Item:3:Transmutation", "Slow:3:Transmutation", "Water Breathing:3:Transmutation", },
			{ "Dimensional Anchor:4:Abjuration", "Fire Trap:4:Abjuration", "Globe of Invulnerability, Lesser:4:Abjuration", "Remove Curse:4:Abjuration", "Stoneskin:4:Abjuration", "Black Tentacles:4:Conjuration",
					"Dimension Door:4:Conjuration", "Minor Creation:4:Conjuration", "Secure Shelter:4:Conjuration", "Solid Fog:4:Conjuration", "Summon Monster IV:4:Conjuration", "Arcane Eye:4:Divination",
					"Detect Scrying:4:Divination", "Locate Creature:4:Divination", "Scrying:4:Divination", "Charm Monster:4:Enchantment", "Confusion:4:Enchantment", "Crushing Despair:4:Enchantment",
					"Geas, Lesser:4:Enchantment", "Fire Shield:4:Evocation", "Ice Storm:4:Evocation", "Resilient Sphere:4:Evocation", "Shout:4:Evocation", "Wall of Fire:4:Evocation", "Wall of Ice:4:Evocation",
					"Hallucinatory Terrain:4:Illusion", "Illusory Wall:4:Illusion", "Invisibility, Greater:4:Illusion", "Phantasmal Killer:4:Illusion", "Rainbow Pattern:4:Illusion", "Shadow Conjuration:4:Illusion",
					"Animate Dead:4:Necromancy", "Bestow Curse:4:Necromancy", "Contagion:4:Necromancy", "Enervation:4:Necromancy", "Fear:4:Necromancy", "Enlarge Person, Mass:4:Transmutation",
					"Mnemonic Enhancer:0:Transmutation", "Polymorph:4:Transmutation", "Reduce Person, Mass:4:Transmutation", "Stone Shape:4:Transmutation", },
			{ "Break Enchantment:5:Abjuration", "Dismissal:5:Abjuration", "Mage's Private Sanctum:5:Divination", "Cloudkill:5:Conjuration", "Mage's Faithful Hound:5:Conjuration", "Major Creation:5:Conjuration",
					"Planar Binding, Lesser:5:Conjuration", "Secret Chest:5:Conjuration", "Summon Monster V:5:Conjuration", "Teleport:5:Conjuration", "Wall of Stone:5:Conjuration", "Contact Other Plane:5:Divination",
					"Prying Eyes:5:Divination", "Telepathic Bond:5:Divination", "Dominate Person:5:Enchantment", "Feeblemind:5:Enchantment", "Hold Monster:5:Enchantment", "Mind Fog:5:Enchantment",
					"Symbol of Sleep:5:Enchantment", "Cone of Cold:5:Evocation", "Interposing Hand:5:Evocation", "Sending:5:Evocation", "Wall of Force:5:Evocation", "Dream:5:Illusion", "False Vision:5:Illusion",
					"Mirage Arcana:5:Illusion", "Nightmare:5:Illusion", "Persistent Image:5:Illusion", "Seeming:5:Illusion", "Shadow Evocation:5:Illusion", "Blight:5:Necromancy", "Magic Jar:5:Necromancy",
					"Symbol of Pain:5:Necromancy", "Waves of Fatigue:5:Necromancy", "Animal Growth:5:Transmutation", "Baleful Polymorph:5:Transmutation", "Fabricate:5:Transmutation", "Overland Flight:5:Transmutation",
					"Passwall:5:Transmutation", "Telekinesis:5:Transmutation", "Transmute Mud to Rock:5:Transmutation", "Transmute Rock to Mud:5:Transmutation", "Permanency:5:Universal", },
			{ "Antimagic Field:6:Abjuration", "Dispel Magic, Greater:6:Abjuration", "Globe of Invulnerability:6:Abjuration", "Guards and Wards:6:Abjuration", "Repulsion:6:Abjuration", "Acid Fog:6:Conjuration",
					"Planar Binding:6:Conjuration", "Summon Monster VI:6:Conjuration", "Wall of Iron:6:Conjuration", "Analyze Dweomer:6:Divination", "Legend Lore:6:Divination", "True Seeing:6:Divination",
					"Geas/Quest:6:Enchantment", "Heroism, Greater:6:Enchantment", "Suggestion, Mass:6:Enchantment", "Symbol of Persuasion:6:Enchantment", "Chain Lightning:6:Evocation", "Contingency:6:Evocation",
					"Forceful Hand:6:Evocation", "Freezing Sphere:6:Evocation", "Mislead:6:Illusion", "Permanent Image:6:Illusion", "Programmed Image:6:Illusion", "Shadow Walk:6:Illusion", "Veil:6:Illusion",
					"Circle of Death:6:Necromancy", "Create Undead:6:Necromancy", "Eyebite:6:Necromancy", "Symbol of Fear:6:Necromancy", "Undeath to Death:6:Necromancy", "Bear's Endurance, Mass:6:Transmutation",
					"Bull's Strength, Mass:6:Transmutation", "Cat's Grace, Mass:6:Transmutation", "Control Water:6:Transmutation", "Disintegrate:6:Transmutation", "Eagle's Splendor, Mass:6:Transmutation",
					"Flesh to Stone:6:Transmutation", "Fox's Cunning, Mass:6:Transmutation", "Mage's Lucubration:0:Transmutation", "Move Earth:6:Transmutation", "Owl's Wisdom, Mass:6:Transmutation",
					"Stone to Flesh:6:Transmutation", "Transformation:6:Transmutation", },
			{ "Banishment:7:Abjuration", "Sequester:7:Abjuration", "Spell Turning:7:Abjuration", "Instant Summons:7:Conjuration", "Mage's Magnificent Mansion:7:Conjuration", "Phase Door:7:Conjuration",
					"Plane Shift:7:Conjuration", "Summon Monster VII:7:Conjuration", "Teleport, Greater:7:Conjuration", "Teleport Object:7:Conjuration", "Arcane Sight, Greater:7:Divination",
					"Scrying, Greater:7:Divination", "Vision:7:Divination", "Hold Person, Mass:7:Enchantment", "Insanity:7:Enchantment", "Power Word Blind:7:Enchantment", "Symbol of Stunning:7:Enchantment",
					"Delayed Blast Fireball:7:Evocation", "Forcecage:7:Evocation", "Grasping Hand:7:Evocation", "Mage's Sword:7:Evocation", "Prismatic Spray:7:Evocation", "Invisibility, Mass:7:Illusion",
					"Project Image:7:Illusion", "Shadow Conjuration, Greater:7:Illusion", "Simulacrum:7:Illusion", "Control Undead:7:Necromancy", "Finger of Death:7:Necromancy", "Symbol of Weakness:7:Necromancy",
					"Waves of Exhaustion:7:Necromancy", "Control Weather:7:Transmutation", "Ethereal Jaunt:7:Transmutation", "Reverse Gravity:7:Transmutation", "Statue:7:Transmutation", "Limited Wish:7:Universal", },
			{ "Dimensional Lock:8:Abjuration", "Mind Blank:8:Abjuration", "Prismatic Wall:8:Abjuration", "Protection from Spells:8:Abjuration", "Incendiary Cloud:8:Conjuration", "Maze:8:Conjuration",
					"Planar Binding, Greater:8:Conjuration", "Summon Monster VIII:8:Conjuration", "Trap the Soul:8:Conjuration", "Discern Location:8:Divination", "Moment of Prescience:8:Divination",
					"Prying Eyes, Greater:8:Divination", "Antipathy:8:Enchantment", "Binding:8:Enchantment", "Charm Monster, Mass:8:Enchantment", "Demand:8:Enchantment", "Irresistible Dance:8:Enchantment",
					"Power Word Stun:8:Enchantment", "Symbol of Insanity:8:Enchantment", "Sympathy:8:Enchantment", "Clenched Fist:8:Evocation", "Polar Ray:8:Evocation", "Shout, Greater:8:Evocation",
					"Sunburst:8:Evocation", "Telekinetic Sphere:8:Evocation", "Scintillating Pattern:8:Illusion", "Screen:8:Illusion", "Shadow Evocation, Greater:8:Illusion", "Clone:8:Necromancy",
					"Create Greater Undead:8:Necromancy", "Horrid Wilting:8:Necromancy", "Symbol of Death:8:Necromancy", "Iron Body:8:Transmutation", "Polymorph Any Object:8:Transmutation",
					"Temporal Stasis:8:Transmutation", },
			{ "Freedom:9:Abjuration", "Imprisonment:9:Abjuration", "Mage's Disjunction:9:Abjuration", "Prismatic Sphere:9:Abjuration", "Gate:9:Conjuration", "Refuge:9:Conjuration", "Summon Monster IX:9:Conjuration",
					"Teleportation Circle:9:Conjuration", "Foresight:9:Divination", "Dominate Monster:9:Enchantment", "Hold Monster, Mass:9:Enchantment", "Power Word Kill:9:Enchantment", "Crushing Hand:9:Evocation",
					"Meteor Swarm:9:Evocation", "Shades:9:Illusion", "Weird:9:Illusion", "Astral Projection:9:Necromancy", "Energy Drain:9:Necromancy", "Soul Bind:9:Necromancy", "Wail of the Banshee:9:Necromancy",
					"Etherealness:9:Transmutation", "Shapechange:9:Transmutation", "Time Stop:9:Transmutation", "Wish:9:Universal", } };
}